<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="<?php echo $pageNum ?>" />
	<input type="hidden" name="numPerPage" value="<?php echo $limit ?>" />
	<input type="hidden" name="orderField" value="<?php echo $field ?>" />
	<input type="hidden" name="orderDirection" value="<?php echo $order_by ?>" />
</form>

<div class="pageHeader" style="display:none;">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?php echo site_url('backend/banner/index'); ?>" method="post">
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?php echo site_url('backend/banner/add') ?>" target="navTab"><span>新增分类</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" postType="string" href="<?php echo site_url('backend/banner/delete') ?>" class="delete"><span>批量删除</span></a></li>
			<li><a class="edit" href="<?php echo site_url('backend/banner/edit?id={sid_user}'); ?>" target="navTab" warn="请选择一个用户"><span>编辑分类</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="javascript:;" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="75">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th orderField="id" class="<?php echo $order_by ?>">ID</th>
				<th>广告图片</th>
				<th>标题</th>
				<th>链接</th>
				<th>创建时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody class="gridImg">
			<?php foreach ($data as $al): ?>
				<tr target="sid_user" rel="<?php echo $al['id'] ?>">
					<td><input name="ids" value="<?php echo $al['id'] ?>" type="checkbox"></td>
					<td><?php echo $al['id'] ?></td>
					<td><a href="<?php echo base_url($al['img'])?>" data-target="fancybox" data-fancybox-group="gallery" title="广告图"><img src="<?php echo base_url($al['img']) ?>" height="48"></a></td>
					<td><?php echo $al['title'] ?></td>
					<td><?php echo $al['link'] ?></td>
					<td><?php echo date('Y-m-d H:i:s', $al['created_at']) ?></td>
					<td>
						<a title="编辑" target="navTab" href="<?php echo site_url('backend/banner/edit?id=' . $al['id']); ?>" class="btnEdit">编辑</a>
						<a title="删除" target="ajaxTodo" href="<?php echo site_url('backend/banner/delete?ids=' . $al['id']); ?>" class="btnDel">删除</a>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage: this.value})">
				<?php foreach (array('20','50','100','200') as $v):?>
				<option value="<?php echo $v?>" <?php if($v==$limit):?>selected="selected"<?php endif;?>><?php echo $v?></option>
				<?php endforeach;?>
			</select>
			<span>条，共<?php echo $totalCount?>条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="<?php echo $totalCount?>" numPerPage="<?php echo $limit?>" pageNumShown="10" currentPage="<?php echo $pageNum?>"></div>

	</div>
</div>
<script src="<?php echo base_url('data/share/js/jquery.fancybox.pack.js');?>" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	$('a[data-target=bannerfancybox]').fancybox();
});
</script>